<template>
  <el-card class="container">
    <img :src="userStore.avatar" alt="" srcset="" style="width: 96px; height: 96px; margin-right: 10px; border-radius: 50%" />
    <span>{{ getNowTime() }}好{{ userStore.username }}，欢迎回来!</span>
  </el-card>
</template>

<script lang="ts" setup>
import { onMounted } from "vue";
import useUserStore from "@/store/modules/user";
import { getNowTime } from "@/utils/util";
const userStore = useUserStore();

onMounted(() => {
  // userStore.userInfo();
});
console.log(userStore);
</script>
<style scoped lang="scss">
.container {
  padding: 30px;
  span {
    display: inline-block;
    height: 96px;
    line-height: 96px;
    vertical-align: top;
    margin-left: 20px;
  }
}
</style>
